#include<bits/stdc++.h>
using namespace std;
typedef pair<int,int> PII;
const int N=2e5+10,M=1e6+10;
int n,t,st[M],ans;
PII f[N];
int main()
{
    freopen("color.in","r",stdin);
    freopen("color.out","w",stdout);
    scanf("%d",&t);
    while(t--)
    {
        memset(st,0,sizeof(st));
        scanf("%d",&n);
        for(int i=1;i<=n;i++)
        {
            int x;
            scanf("%d",&x);
            if(!st[x]) st[x]=i;
            else f[i].first=x,f[i].second=st[x];
        }
        for(int i=n;i>=1;i--)
        {
            int res;


        }
        cout<<ans<<endl;
    }
    return 0;
}
